import { Pipe, PipeTransform } from '@angular/core';

/**
 * 一个转换股票symbol的Pipe, 去掉末尾的市场信息
 * @export
 * @class PostSymbolTrimPipe
 * @implements {PipeTransform}
 */
@Pipe({
  name: "postSymbolTrim"
})

export class PostSymbolTrimPipe implements PipeTransform {
  transform(value: string, args: any[]): string {
    return value ? value.replace(/\..+/, "") : value;
  }
}